<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2019/10/29
 * Time: 10:38
 */

namespace app\adminapiv3\controller;

//数据备份
class ServerDatabaseBak extends BaseController
{
    /**
     * @name 数据库地址设置
     * @author wx
     * @date 2019/11/29 13:19
     */
    public function databaseConf()
    {
        $ip = $this->filterInput('ip*','post');
        $port = $this->filterInput('port*','post');

        $server = new \app\adminapiv3\service\ServerDatabaseBak();
        $this->toDo([$server, 'databaseConf'], [$ip, $port]);

        $this->jsonOutPut();
    }

    /**
     * @name 获取数据库设置
     * @author wx
     * @date 2019/11/29 13:19
     */
    public function databaseGet()
    {
        $server = new \app\adminapiv3\service\ServerDatabaseBak();
        $info = $this->toDo([$server, 'databaseGet']);

        $this->jsonOutPut($info);
    }

}